package cn.codeinn.service1.controller;

import cn.codeinn.common.util.RS;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@Api
@RestController
@RequestMapping(value = "/other")
public class OtherController {

    @GetMapping(value = "/test1")
    public RS testString() {
        String a = "abc";
        String b = "abc";
        System.out.println(a.equals(b));

        StringBuilder stringBuilder1 = new StringBuilder();
        StringBuilder stringBuilder2 = new StringBuilder();

        stringBuilder1.append("abc");
        stringBuilder2.append("abc");

        System.out.println(a.equals(stringBuilder1.toString()));

        System.out.println(stringBuilder1.equals(stringBuilder2));

        System.out.println(stringBuilder1.toString().equals(stringBuilder2.toString()));
        return RS.ok();
    }
}
